class User:  # 自定义用户类
    def __init__(self, user_id, user_name, user_pid, user_phone):
        self.money = 0
        self.user_id = user_id
        self.user_name = user_name
        self.user_pid = user_pid
        self.user_phone = user_phone

    def getMoney(self):
        # 其实可以直接用 ‘对象.money’ 获取
        return self.money

    def saveMoney(self, n):
        self.money += int(n)

    def outputMoney(self, n):
        self.money -= n
